import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import "virtual:svg-icons-register";

const globalComponents = import.meta.glob('@/components/global/*.vue', { eager: true })

const app = createApp(App)
Object.entries(globalComponents).forEach(([path, mod]) => {
    // 提取文件名作为组件名
    const name = path
      .split('/')
      .pop()
      ?.replace('.vue', '')
  
    if (name) {
      // 注册为全局组件
      app.component(name, (mod as any).default)
    }
  })
app.mount('#app')


